/*
 * Copyright (C) 2010-2010 MaoJian Wu
 *
 * Author:
 *	MaoJian Wu
 *
 * Source:
 *	
 *
 * This file is a part of zfspear library.
 *
 *
 */

#ifndef ELEMENT_TYPE_H
#define ELEMENT_TYPE_H
#include <QString>
#include <QHash>
class ElementType
{
public:
    ElementType(const QString& tag,const QString& ns);

    inline const QString&  tag_name() const
    {
        return tag_name_;
    }
    inline  const QString&  namespace_str()  const
    {
        return namespace_str_;
    }

private:
    QString tag_name_;
    QString namespace_str_;
};
inline bool operator==(const ElementType &e1, const ElementType &e2)
{
    return e1.tag_name() == e2.tag_name()
           && e1.namespace_str() == e2.namespace_str();
}

inline uint qHash(const ElementType &key)
{
    return qHash(key.tag_name()) ^ qHash(key.namespace_str());
}
#endif // ELEMENT_TYPE_H
